home *** CD-ROM | disk | FTP | other *** search
Text File | 2002-03-15 | 43.3 KB | 1,176 lines | [TEXT/Pyth] |
- # ATHorc.py
- #-----------------------------------------------------------------||||||||||||--
- # Copyright (c) 2001 Christopher Ariza.
- #
- # athenaCL comes with ABSOLUTELY NO WARRANTY;
- # for details see waranty information within athenaObj.py.
- # This is free software, and you are welcome to redistribute it under certain
- # conditions; for details see copyright information within athenaObj.py.
- #-----------------------------------------------------------------||||||||||||--
-
- import time
-
- #-----------------------------------------------------------------||||||||||||--
- # this file is a combination of orc.py and ATHorc.orc
- # rather than use a built score, now scores are dynamically create
- # from version 1.0.11 on.
-
-
- class orcBuilder:
- instrNumbers = (2,3,4,5,6,7,9,10,11,12,13,20,21,22,30,40)
-
- orcTitle = ';' + ('-'*65) + ('|'*12) + ('-'*2) + '\n' + ';athenaCL orchestra\n'
- orcTitle = orcTitle + ';www.flexatone.com/athenaCL\n'
- orcTitle = orcTitle + ';orchestra created on: %r\n' % time.asctime(time.localtime(time.time()))
- orcTitle = orcTitle + ';' + ('-'*65) + ('|'*12) + ('-'*2) + '\n' + ';athenaCL orchestra\n'
-
- orcHeaderMono = '''
- sr = 44100
- kr = 4410
- ksmps = 10
- nchnls = 1
- '''
- orcHeaderStereo = '''
- sr = 44100
- kr = 4410
- ksmps = 10
- nchnls = 2
- '''
- orcHeaderQuad = '''
- sr = 44100
- kr = 4410
- ksmps = 10
- nchnls = 4
- '''
- scoFtables = '''
- ;f-tables
- f1 0 4096 10 1 ; sine wave
- f2 0 1025 5 1 1024 .002 ; risset bell
- f3 0 16384 10 1 ; risset bell
- f4 0 2048 10 1 .5 .3 .25 .2 .167 .14 .125 .111 ; Sawtooth
- f5 0 2048 10 1 0 .3 0 .2 0 .14 0 .111 ; Square
- f6 0 2048 10 1 1 1 1 .7 .5 .3 .1 ; Pulse
- f7 0 2048 19 .5 1 270 1 ; sigmoid rise
- f8 0 4097 7 0 100 .1 300 3 600 1 3000 .01 96 0 ; buzz f-card
- f9 0 256 10 1 ; low rez sine
- f13 0 1024 8 -.8 42 -.78 400 -.7 140 .7 400 .78 42 .8 ; distortion table
-
- ;f-tables--i20
- ;exponentially decaying amplitude envelope for carrier signal
- f201 0 512 5 1 512 .001
- ;amplitude envelope for frequency modulation
- f202 0 512 7 1 64 0 448 0
- ;waveform of carrier signal
- f203 0 512 9 1 1 0
-
- ;f-tables--i21
- f210 0 512 10 1 ; carriers
- f211 0 1024 5 .0001 200 1 674 1 150 .0001 ; amplitude envelope
- f212 0 1024 5 1 1024 .0001 ; index envelope
-
- ;f-tables--i22
- f231 0 512 7 1 64 0 448 0 ; index envelope
- f251 0 513 5 .8 113 1 10 1 390 .0001 ; amplitude envelope
- '''
-
-
- # instrObjDict is built for each command: bad?!
- def constructOrc(self, noChannels=2):
- self.orc = self.orcTitle
- self.noChannels = noChannels
- if self.noChannels == 1:
- self.orc = self.orc + self.orcHeaderMono
- elif self.noChannels == 2:
- self.orc = self.orc + self.orcHeaderStereo
- elif self.noChannels == 4:
- self.orc = self.orc + self.orcHeaderQuad
- self.instrObjDict = {}
- for number in self.instrNumbers:
- self.instrObjDict[('i%i' % number)] = eval(('instr%i()' % number))
- instrObj = self.instrObjDict[('i%i' % number)]
- self.orc = self.orc + instrObj.buildInstrDef(noChannels)
- return self.orc
-
- def clearOrc(self, noChannels):
- if self.instrObjDict:
- del self.instrObjDict
-
- def getInstrInfo(self):
- 'returns a dictionary of instrNo : (Name, pNo)'
- self.instrObjDict = {}
- instInfoDict = {}
- for number in self.instrNumbers:
- self.instrObjDict[('i%i' % number)] = eval(('instr%i()' % number))
- instrObj = self.instrObjDict[('i%i' % number)]
- instInfoDict[number] = (instrObj.name, instrObj.pmtrFields)
- return instInfoDict
-
- def getInstrPreset(self, iNo):
- 'returns a dictionary of default values'
- instrObject = eval(('instr%i()' % iNo))
- presetDict = instrObject.getPresetDict()
- return presetDict
-
- def getInstrName(self, iNo):
- 'returns a dictionary of default values'
- instrObject = eval(('instr%i()' % iNo))
- return instrObject.name
-
- #-----------------------------------------------------------------||||||||||||--
- class instrShell:
- # outputs expect and instrument to have a single final signal, calld "aMixSig
- # this bit of codes gets appended to end of inst def
- monoOutput = '''
- ;--stereo panning around 90 degrees
- out aMixSig
- endin
- '''
- stereoOutput = '''
- ;--stereo panning around 90 degrees
- iCirclePan = 90.0 * ipan ; scale 90 with values from 0 to 1
- kdegree line iCirclePan, p3, iCirclePan
- kdistance line 1, p3, 1 ; used to distance reverb, need a constant 1
- asig1, asig2 locsig aMixSig, kdegree, kdistance, 0.0
- outs asig1, asig2
- endin
- '''
- quadOutput = '''
- ;--quad panning around 360 degrees
- iCirclePan = 360.0 * ipan ; scale 90 with values from 0 to 1
- kdegree line iCirclePan, p3, iCirclePan
- kdistance line 1, p3, 1 ; used to distance reverb, need a constant 1
- asig1, asig2, asig3, asig4 locsig aMixSig, kdegree, kdistance, 0.0
- outq asig1, asig2, asig3, asig4
- endin
- '''
- # defined in each sub-classed instrument
- #inumber = 12
- #name = 'noiseFiltered'
- #info = 'A noisy instrument with with a filter.'
- #pmtrFields = 8 # this is the base number
- #pmtrInfo = {} # holds discription, preset for each pmtr in a dictionary
- #author = '' # attribution
- #orcCode = ''
- #scoSample ''
-
- def __init__(self):
- pass
-
- def getInstrHeader(self):
- return '\n;--||||||||||||--i%i--%s' % (self.inumber, self.name)
-
- def buildInstrDef(self, noChannels):
- 'returns a string of all the code needed for this instrument'
- orcString = self.getInstrHeader()
- orcString = orcString + self.orcCode
- self.noChannels = noChannels
- if self.noChannels == 1:
- orcString = orcString + self.monoOutput
- elif self.noChannels == 2:
- orcString = orcString + self.stereoOutput
- elif self.noChannels == 4:
- orcString = orcString + self.quadOutput
- return orcString
-
- def getPresetDict(self):
- presetDict = {}
- # some fixed values:
- presetDict['fieldQ'] = ('basketGen', 'orderedCyclic', [0])
- presetDict['auxQ'] = (0,) # an empty tuple is default aux value
-
- # get values from self.default
- auxDict = {}
- for key in self.default.keys(): # isolate pmtr fields
- if key[:4] == 'pmtr': # rename pmtr keys to a single auxQ list of entries
- newKey = key[4:] # this is the number as pmtr field
- newKey = eval(newKey) - (self.pmtrFields + 1) # make pmtr7 == aux0
- auxDict[newKey] = self.default[key]
- else:
- presetDict[key] = self.default[key]
- auxKeyList = auxDict.keys() # get numbers
- if self.pmtrFields > 6: # 6 is standard size
- auxKeyList.sort()
- auxQ = [] # pack all into a list
- for keyNo in auxKeyList: # gets number in order
- auxQ.append(auxDict[keyNo])
- presetDict['auxQ'] = auxQ
- return presetDict
-
- #-----------------------------------------------------------------||||||||||||--
- #-----------------------------------------------------------------||||||||||||--
- # these classes inherit all functions from instrShell
-
-
-
- #-----------------------------------------------------------------||||||||||||--
- class instr2(instrShell):
- inumber = 2
- name = 'additiveBellBright'
- info = 'A simple bell made with 12 partials, each with their own envelope, then mixed together. Based on design by C. Risset.'
- pmtrFields = 6 # this is the base number
- pmtrInfo = {} # infor for aux perameters (greater than six)
- default = {
- 'rhythmQ' : ((16, 1), (16, 3)), #(division1, #), (division2, #)
- 'octQ' : ([7,8], 'randomChoice'), #([list of registers], 0=random/1=ordered) (8.00 = C4)
- 'ampQ' : (60,70, 1, 'linearUp'), #lowest, highest, increment (in db), direction
- 'panQ' : (.20, .80, .08, 'linearDown'), #lowest, highest(1 max), increment, direction
- }
- author = '' # attribution
- orcCode = '''
- instr 2
- ipan = p6
- idur1 = p3
- iamp1 = ampdb(p4)
- ifreq1 = (cpspch(p5) * .56)
- idur2 = (p3 * .9)
- iamp2 = (ampdb(p4) * .67)
- ifreq2 = (cpspch(p5))
- idur3 = (p3 * .65)
- iamp3 = (ampdb(p4))
- ifreq3 = (cpspch(p5) * .92)
- idur4 = (p3 * .55)
- iamp4 = (ampdb(p4) * 1.8)
- ifreq4 = (cpspch(p5) * 2.62)
- idur5 = (p3 * .35)
- iamp5 = (ampdb(p4) * 2.67)
- ifreq5 = (cpspch(p5) * 1.19)
- idur6 = (p3 * .35)
- iamp6 = (ampdb(p4) * 1.67)
- ifreq6 = (cpspch(p5) * 1.7)
- idur7 = (p3 * .25)
- iamp7 = (ampdb(p4) * 1.46)
- ifreq7 = (cpspch(p5) * 2)
- idur8 = (p3 * .2)
- iamp8 = (ampdb(p4) * 1.33)
- ifreq8 = (cpspch(p5) * 2.74)
- idur9 = (p3 * .15)
- iamp9 = (ampdb(p4) * 1.33)
- ifreq9 = (cpspch(p5) * 3)
- idur10 = (p3 * .1)
- iamp10 = (ampdb(p4))
- ifreq10= (cpspch(p5) * 3.76)
- idur11 = (p3 * .075)
- iamp11 = (ampdb(p4) * 1.33)
- ifreq11= (cpspch(p5) * 4.07)
-
- ;create oscilators for each partial
- koscil1 oscil1i 0, iamp1, idur1, 2
- aoscili1 oscili koscil1, ifreq1, 3
- koscil2 oscil1i 0, iamp2, idur2, 2
- aoscili2 oscili koscil2, ifreq2, 3
- koscil3 oscil1i 0, iamp3, idur3, 2
- aoscili3 oscili koscil3, ifreq3, 3
- koscil4 oscil1i 0, iamp4, idur4, 2
- aoscili4 oscili koscil4, ifreq4, 3
- koscil5 oscil1i 0, iamp5, idur5, 2
- aoscili5 oscili koscil5, ifreq5, 3
- koscil6 oscil1i 0, iamp6, idur6, 2
- aoscili6 oscili koscil6, ifreq6, 3
- koscil7 oscil1i 0, iamp7, idur7, 2
- aoscili7 oscili koscil7, ifreq7, 3
- koscil8 oscil1i 0, iamp8, idur8, 2
- aoscili8 oscili koscil8, ifreq8, 3
- koscil9 oscil1i 0, iamp9, idur9, 2
- aoscili9 oscili koscil9, ifreq9, 3
- koscil10 oscil1i 0, iamp10, idur10, 2
- aoscili10 oscili koscil10, ifreq10, 3
- koscil11 oscil1i 0, iamp11, idur11, 2
- aoscili11 oscili koscil11, ifreq11, 3
-
- ;output assignments
- aMixSig = (aoscili1+aoscili2+aoscili3+aoscili4+aoscili5 + aoscili6+aoscili7+aoscili8+aoscili9+aoscili10+aoscili11)
- '''
- scoSample = '''
- ;p1 p2 p3 p4 p5 p6
- ;inst start dur amp PCH pan
- i2 12.00 1.000 97 7.09 .5
- i2 12.10 1.000 84 8.09 .5
- '''
-
- #-----------------------------------------------------------------||||||||||||--
- class instr3(instrShell):
- inumber = 3
- name = 'sineWaveDrone'
- info = 'A simple sine wave drone.'
- pmtrFields = 6 # total number
- pmtrInfo = {} # holds discription, preset for each pmtr in a dictionary
- default = {
- 'rhythmQ' : ((4, 5), (4, 5)),
- 'octQ' : ([7,8], 'randomChoice'),
- 'ampQ' : (60,70, 1, 'linearUp') ,
- 'panQ' : (.60, 1.0, .08, 'linearDown'),
- }
- author = 'athenaCL native' # attribution
- orcCode = '''
- instr 3
- idur = p3
- iamp = ampdb(p4)
- ifreq = cpspch(p5)
- ipan = p6
-
- ;generate aplitude envelope
- ; amp attack dur release
- k1 linen iamp, (idur * .18), idur, (idur*.19)
-
- ;generate vibrato envelope
- irel = 1.00 ; set vibrato release time
- idel1 = idur-(.25 * idur) ; calculate initial delay (% of dur)
- isus = idur - (idel1 - irel) ; calculate remaining duration
- idep = 2 ; vibrato depth (1-9 are good)
- irat = 1 ; vibrato rate (1-9 are good)
- ;
- ;linseg does delay, osicl does vibrato, k4 uses pulse wave
- k3 linseg 0, idel1, idep, isus, idep, irel, 0
- k2 oscil k3, irat, 1
- k4 oscil k3, (irat * .666), 6
-
- ;generate oscilator using k1, add vibrato w/k2, k4
- ; amp freq waveshape
- a1 oscil k1, (ifreq + k2), 1
- a2 oscil (k1 * .8), ((ifreq * .5) + (k4 * .5)), 1
-
- aMixSig = (a1 + a2)
- '''
- scoSample = '''
- ;p1 p2 p3 p4 p5 p6
- ;inst start dur amp PCH pan
- i3 68.00 00.500 95 5.08 .5
- i3 68.66 00.500 75 6.11 .5
- '''
-
- #-----------------------------------------------------------------||||||||||||--
- class instr4(instrShell):
- inumber = 4
- name = 'additiveBellDark'
- info = 'A simple bell made with 12 partials, each with their own envelope, then mixed together. Based on design by C. Risset.'
- pmtrFields = 6 # this is the base number
- pmtrInfo = {} # holds discription, preset for each pmtr in a dictionary
- default = {
- 'rhythmQ' : ((4, 5), (4, 5)),
- 'octQ' : ([7,8], 'randomChoice'),
- 'ampQ' : (60,70, 1, 'linearUp') ,
- 'panQ' : (.60, 1.0, .08, 'linearDown'),
- }
- author = '' # attribution
- orcCode = '''
- ; "INSTRUMENT 4, bell"
- instr 4
- ipan = p6
- idur1 = (p3 * .5)
- iamp1 = (ampdb(p4) * .5)
- ifreq1 = (cpspch(p5) * .2)
- idur2 = (p3 * .5)
- iamp2 = (ampdb(p4) * .7)
- ifreq2 = (cpspch(p5) * .5)
- idur3 = (p3 * .5)
- iamp3 = (ampdb(p4) * 1)
- ifreq3 = (cpspch(p5) * .8)
- idur4 = (p3 * .6)
- iamp4 = (ampdb(p4) * 1.2)
- ifreq4 = (cpspch(p5) * 1)
- idur5 = (p3 * .7)
- iamp5 = (ampdb(p4) * 1.5)
- ifreq5 = (cpspch(p5) * 1.2)
- idur6 = (p3 * 1.2)
- iamp6 = (ampdb(p4) * 1.5)
- ifreq6 = (cpspch(p5) * 1.5)
- idur7 = (p3 * 1.2)
- iamp7 = (ampdb(p4) * 1.6)
- ifreq7 = (cpspch(p5) * 2)
- idur8 = (p3 * 1.2)
- iamp8 = (ampdb(p4) * 1.7)
- ifreq8 = (cpspch(p5) * 3)
- idur9 = (p3 * 1.3)
- iamp9 = (ampdb(p4) * 1.8)
- ifreq9 = (cpspch(p5) * 3)
- idur10 = (p3 * 1.4)
- iamp10 = (ampdb(p4) * 1.9)
- ifreq10= (cpspch(p5) * 4.5)
- idur11 = (p3 * 1.5)
- iamp11 = (ampdb(p4) * 2)
- ifreq11= (cpspch(p5) * 4.8)
-
- koscil1 oscil1i 0, iamp1, idur1, 2
- aoscili1 oscili koscil1, ifreq1, 3
- koscil2 oscil1i 0, iamp2, idur2, 2
- aoscili2 oscili koscil2, ifreq2, 3
- koscil3 oscil1i 0, iamp3, idur3, 2
- aoscili3 oscili koscil3, ifreq3, 3
- koscil4 oscil1i 0, iamp4, idur4, 2
- aoscili4 oscili koscil4, ifreq4, 3
- koscil5 oscil1i 0, iamp5, idur5, 2
- aoscili5 oscili koscil5, ifreq5, 3
- koscil6 oscil1i 0, iamp6, idur6, 2
- aoscili6 oscili koscil6, ifreq6, 3
- koscil7 oscil1i 0, iamp7, idur7, 2
- aoscili7 oscili koscil7, ifreq7, 3
- koscil8 oscil1i 0, iamp8, idur8, 2
- aoscili8 oscili koscil8, ifreq8, 3
- koscil9 oscil1i 0, iamp9, idur9, 2
- aoscili9 oscili koscil9, ifreq9, 3
- koscil10 oscil1i 0, iamp10, idur10, 2
- aoscili10 oscili koscil10, ifreq10, 3
- koscil11 oscil1i 0, iamp11, idur11, 2
- aoscili11 oscili koscil11, ifreq11, 3
-
- aMixSig = (aoscili1+aoscili2+aoscili3+aoscili4+aoscili5 + aoscili6+aoscili7+aoscili8+aoscili9+aoscili10+aoscili11)
- '''
- scoSample = '''
- ;p1 p2 p3 p4 p5 p6
- ;inst start dur amp PCH pan
- i2 12.00 1.000 97 7.09 .5
- i2 12.10 1.000 84 8.09 .5
-
- '''
-
- #-----------------------------------------------------------------||||||||||||--
- class instr5(instrShell):
- inumber = 5
- name = 'sawWaveDrone'
- info = 'A simple bell made with 12 partials, each with their own envelope, then mixed together. Based on design by C. Risset.'
- pmtrFields = 6 # total
- pmtrInfo = {} # holds discription, preset for each pmtr in a dictionary
- default = {
- 'rhythmQ' : ((2, 4), (2, 1)),
- 'octQ' : ([7,8], 'randomChoice'),
- 'ampQ' : (60,70, 2, 'linearUpDown'),
- 'panQ' : (.20, .60, .08, 'linearDown'),
- }
- author = '' # attribution
- orcCode = '''
- instr 5
- idur = p3
- iamp = ampdb(p4)
- ifreq = cpspch(p5)
- ipan = p6
-
- ;generate aplitude envelope
- ; amp attack dur release
- k1 linen iamp, (idur * .18), idur, (idur *.19)
-
- ;generate vibrato envelope
- irel = 1.00 ; set vibrato release time
- idel1 = idur - (.25 * idur) ; calculate initial delay (% of dur)
- isus = idur - (idel1 - irel) ; calculate remaining duration
- idep = 2 ; vibrato depth (1-9 are good)
- irat = 1 ; vibrato rate (1-9 are good)
- ;
- ;linseg does delay, osicl does vibrato, k4 uses pulse wave
- k3 linseg 0, idel1, idep, isus, idep, irel, 0
- k2 oscil k3, irat, 1
- k4 oscil k3, (irat*.666), 6
-
- ;generate oscilator using k1, add vibrato w/k2, k4
- ; amp freq waveshape
- a1 oscil k1, (ifreq + k2), 4
- a2 oscil (k1*.8), ((ifreq * .5) + (k4 *.5)), 1
-
- aMixSig = (a1+a2)
- '''
- scoSample = '''
- ;p1 p2 p3 p4 p5 p6
- inst start dur amp PCH pan
- i5 12.00 1.000 95 7.09 .5
- i5 12.10 1.000 84 8.09 .5
- '''
-
- #-----------------------------------------------------------------||||||||||||--
- class instr6(instrShell):
- inumber = 6
- name = 'pluckFormant'
- info = 'A pluck that slowly morphs into a vocal, formant derived sound.'
- pmtrFields = 16 # this is the base number
- pmtrInfo = {
- 'pmtr7' : 'ipluckamp, % of total amp, 1=dB amp as in p4',
- 'pmtr8' : 'ipluckdur, % of total dur, 1=entire dur of note',
- 'pmtr9' : 'ifmamp, % of total amp, 1=dB amp as in p4',
- 'pmtr10' : 'ifmrise, % of total dur, 1=entire dur of note',
- 'pmtr11' : 'ifmdec, % of total duration',
- 'pmtr12' : 'index',
- 'pmtr13' : 'ivibdepth',
- 'pmtr14' : 'ivibrate',
- 'pmtr15' : 'iformantamp',
- 'pmtr16' : 'iformantrise',
- } # holds discription, preset for each pmtr in a dictionary
- default = {
- 'rhythmQ' : ((2, 3), (2, 9)),
- 'octQ' : ([7,8], 'randomChoice'),
- 'ampQ' : (60,70, 4, 'linearDown') ,
- 'panQ' : (.30, .70, .08, 'linearDown'),
- 'pmtr7' : (.8, .9, .05, 'linearUp'),
- 'pmtr8' : (.2, .4, .05, 'linearUp'),
- 'pmtr9' : (.7, .8, .05, 'linearUp'),
- 'pmtr10' : (.2, .35, .05, 'linearUp'),
- 'pmtr11' : (.3, .40, .05, 'linearUp'),
- 'pmtr12' : (6, 8, 1, 'linearUpDown'),
- 'pmtr13' : (1, 1, 0, 'linearUpDown'),
- 'pmtr14' : (4, 6, 1, 'linearUp'),
- 'pmtr15' : (3, 3, 0, 'linearUpDown'),
- 'pmtr16' : (.5, .8, .1, 'linearUp'),
- }
- author = '' # attribution
- orcCode = '''
- instr 6
- iamp = ampdb(p4) / 2 ; amplitude, scaled for two sources
- ifreq = cpspch(p5)
-
- ipan = p6
- ipluckamp = p7 ; % of total amp, 1=dB amp as in p4
- ipluckdur = p8 * p3 ; % of total dur, 1=entire dur of note
- ipluckoff = p3 - ipluckdur
-
- ifmamp = p9 ; % of total amp, 1=dB amp as in p4
- ifmrise = p10 * p3 ; % of total dur, 1=entire dur of note
- ifmdec = p11 * p3 ; % of total duration
- ifmoff = p3 - (ifmrise + ifmdec)
- index = p12
- ivibdepth = p13
- ivibrate = p14
- iformantamp = p15 ; % of total amp, 1=dB amp as in p4
- iformantrise = p16 * p3 ; % of total dur, 1=entire dur of note
- iformantdec = p3 - iformantrise
-
- kpluck linseg ipluckamp, ipluckdur, 0, ipluckoff, 0
- apluck1 pluck iamp, ifreq, ifreq, 0, 1
- apluck2 pluck iamp, ifreq * 1.003, ifreq * 1.003, 0, 1
- apluck = kpluck * (apluck1+apluck2)
-
- kfm linseg 0, ifmrise, ifmamp, ifmdec, 0, ifmoff, 0
- kndx = kfm * index
- afm1 foscil iamp, ifreq, 1, 7, kndx, 1
- afm2 foscil iamp, ifreq * 1.003, 1.003, 2.003, kndx, 1
- afm = kfm * (afm1+afm2)
-
- kfrmnt linseg 0, iformantrise, iformantamp, iformantdec, 0
- kvib oscil ivibdepth, ivibrate, 1
- afrmnt1 fof iamp, ifreq + kvib, 650, 0, 40, .003, .017, .007, 4, 1, 7, p3
- afrmnt2 fof iamp, (ifreq*1.001)+kvib*.009, 650, 0, 40, .003,.017,.007, 10,1,7,p3
- aformnt = kfrmnt * (afrmnt1+afrmnt2)
-
- aMixSig = (apluck + afm + aformnt)
- '''
- scoSample = '''
- ;values b/n 0 & 1.
- ;p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16
- ;ins st dr amp PCH pan plkmp plkdr fmp fmris fmdec indx vbdp vbrt frmp fris
- i13 52.11 4 80 7.09 .5 .8 .3 .7 .2 .35 8 1 5 3 .5
- i13 53.44 4 80 7.09 .5 .8 .4 .7 .35 .35 7 1 6 3 .7
- i13 54.77 6 80 7.09 .5 .8 .3 .7 .2 .4 6 1 4 3 .6
- i13 56.00 8 80 7.09 .5 .8 .3 .7 .2 .4 6 1 5 3 .6
- '''
-
- #-----------------------------------------------------------------||||||||||||--
- class instr7(instrShell):
- inumber = 7
- name = 'waveformVibrato'
- info = 'A waveform derived instrument that has vibrato controls.'
- pmtrFields = 14 # total
- pmtrInfo = {
- 'pmtr7' : 'attack',
- 'pmtr8' : 'release rate',
- 'pmtr9' : 'vibrato depth',
- 'pmtr10' : 'vibrato delay',
- 'pmtr11' : 'vibrato fq',
- 'pmtr12' : 'start',
- 'pmtr13' : 'end',
- 'pmtr14' : 'xtime',
- } # holds discription, preset for each pmtr in a dictionary
- default = {
- 'rhythmQ' : ((9, 6), (9, 2)),
- 'octQ' : ([7,8], 'randomChoice'),
- 'ampQ' : (60,70, 4, 'linearDown') ,
- 'panQ' : (.30, .70, .08, 'linearDown'),
- 'pmtr7' : (1, 4, 1, 'linearUp'),
- 'pmtr8' : (2, 3, 1, 'linearUp'),
- 'pmtr9' : (2, 4, 1, 'linearUp'),
- 'pmtr10' : (2, 4, 1, 'linearUp'),
- 'pmtr11' : (.2, 2, .1, 'linearUpDown'),
- 'pmtr12' : (1, 6, 1, 'linearUpDown'),
- 'pmtr13' : (1, 5, 1, 'linearUpDown'),
- 'pmtr14' : (.6, .8, .01, 'linearUp'),
- }
- author = '' # attribution
- orcCode = '''
- instr 7
- ipan = p6
-
- ifunc1 = p12 ; initial waveform
- ifunc2 = p13 ; crossfade waveform
- ifad1 = p3 - (p14 * p3) ; calculate initial fade
- ifad2 = p3 - ifad1 ; calculate remaining dur
- irel = .1 ; set vibrato release
- idel1 = p3 - (p11 * p3) ; calculate initial delay
- isus = p3 - (idel1- irel) ; calculate remaining dur
- iamp = ampdb(p4)
- iscale = iamp * .166 ; p4=amp
- inote = cpspch(p5) ; p5=freq
-
- k3 linseg 0, idel1, p10, isus, p10, irel, 0 ; p7=attack time
- k2 oscil k3, p9, 1 ; p7=release time
- k1 linen iscale, p7, p3, p8 ; p9=vib rate
- a6 oscil k1, inote*.5+k2, ifunc2 ; p10=vib depth
- a5 oscil k1, inote*1.25+k2, ifunc2 ; p11=vib delay (0-1)
- a4 oscil k1, inote+k2, ifunc2 ; p12=initial wave
- a3 oscil k1, inote*.997+k2, ifunc1 ; p13=cross wave
- a2 oscil k1, inote*1.003+k2, ifunc1 ; p14=fade time (0-1)
- a1 oscil k1, inote+k2, ifunc1
-
- kfade linseg 1, ifad1, 0, ifad2, 1
- afunc1 = kfade * (a1+a2+a3)
- afunc2 = (1 - kfade) * (a4+a5+a6)
-
- aMixSig = (afunc1 + afunc2)
- '''
- scoSample = '''
-
- ;p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14
- ;inst start dur amp freq pan atk rels vib vib vib start end xtime
- ; (dbs) (pch) rate depth delay (f)
- i7 53 14 95 8.04 .5 3 3 2 4 .4 1 5 .8
- i7 55 12 95 8.03 .5 2 3 4 3 .4 6 1 .8
- '''
-
- #-----------------------------------------------------------------||||||||||||--
- class instr9(instrShell):
- inumber = 9
- name = 'additiveBellClear'
- info = 'A simple bell made with 12 partials, each with their own envelope, then mixed together. Based on design by C. Risset.'
- pmtrFields = 6 # this is the base number
- pmtrInfo = {} # holds discription, preset for each pmtr in a dictionary
- default = {
- 'rhythmQ' : ('loop', ((2,1,1),(2,3,1),(4,3,0))), #(division1, #), (division2, #)
- 'octQ' : ([7,8], 'randomChoice'), #([list of registers], 0=random/1=ordered) (8.00 = C4)
- 'ampQ' : (60,70, 1, 'linearUp'), #lowest, highest, increment (in db), direction
- 'panQ' : (.20, .80, .08, 'linearDown'), #lowest, highest(1 max), increment, direction
- }
- author = '' # attribution
- orcCode = '''
- instr 9
- ipan = p6
-
- idur1 = p3
- iamp1 = ampdb(p4)
- ifreq1 = (cpspch(p5) * 1)
-
- idur2 = (p3 * .9)
- iamp2 = (ampdb(p4) * .80)
- ifreq2 = (cpspch(p5) * 1.5)
-
- idur3 = (p3 * .70)
- iamp3 = (ampdb(p4) * .70)
- ifreq3 = (cpspch(p5) * 2)
-
- idur4 = (p3 * .60)
- iamp4 = (ampdb(p4) * .80)
- ifreq4 = (cpspch(p5) * 2.5)
-
- idur5 = (p3 * .40)
- iamp5 = (ampdb(p4) * .55)
- ifreq5 = (cpspch(p5) * 3)
-
- idur6 = (p3 * 1.05)
- iamp6 = (ampdb(p4) * .48)
- ifreq6 = (cpspch(p5) * 4)
-
- idur7 = (p3 * .80)
- iamp7 = (ampdb(p4) * .40)
- ifreq7 = (cpspch(p5) * 5)
-
- idur8 = (p3 * .65)
- iamp8 = (ampdb(p4) * .35)
- ifreq8 = (cpspch(p5) * 6)
-
- idur9 = (p3 * .15)
- iamp9 = (ampdb(p4) * .30)
- ifreq9 = (cpspch(p5) * 7)
-
- idur10 = (p3 * .90)
- iamp10 = (ampdb(p4))
- ifreq10= (cpspch(p5) * 8)
-
- idur11 = (p3 * .10)
- iamp11 = (ampdb(p4) * .28)
- ifreq11= (cpspch(p5) * 9)
-
- ;create oscilators for each partial
- koscil1 oscil1i 0, iamp1, idur1, 2
- aoscili1 oscili koscil1, ifreq1, 3
- koscil2 oscil1i 0, iamp2, idur2, 2
- aoscili2 oscili koscil2, ifreq2, 3
- koscil3 oscil1i 0, iamp3, idur3, 2
- aoscili3 oscili koscil3, ifreq3, 3
- koscil4 oscil1i 0, iamp4, idur4, 2
- aoscili4 oscili koscil4, ifreq4, 3
- koscil5 oscil1i 0, iamp5, idur5, 2
- aoscili5 oscili koscil5, ifreq5, 3
- koscil6 oscil1i 0, iamp6, idur6, 2
- aoscili6 oscili koscil6, ifreq6, 3
- koscil7 oscil1i 0, iamp7, idur7, 2
- aoscili7 oscili koscil7, ifreq7, 3
- koscil8 oscil1i 0, iamp8, idur8, 2
- aoscili8 oscili koscil8, ifreq8, 3
- koscil9 oscil1i 0, iamp9, idur9, 2
- aoscili9 oscili koscil9, ifreq9, 3
- koscil10 oscil1i 0, iamp10, idur10, 2
- aoscili10 oscili koscil10, ifreq10, 3
- koscil11 oscil1i 0, iamp11, idur11, 2
- aoscili11 oscili koscil11, ifreq11, 3
-
- ;output assignments
- aMixSig = (aoscili1+aoscili2+aoscili3+aoscili4+aoscili5 + aoscili6+aoscili7+aoscili8+aoscili9+aoscili10+aoscili11)
- '''
- scoSample = '''
-
- ;p1 p2 p3 p4 p5 p6
- ;inst start dur amp PCH pan
- i9 12.00 1.000 97 7.09 .5
- i9 12.10 1.000 84 8.09 .5
- '''
- #-----------------------------------------------------------------||||||||||||--
- class instr10(instrShell):
- inumber = 10
- name = 'tamHats'
- info = 'Percussive sound somewhere between tam-tam and high-hat.'
- pmtrFields = 8 # this is the base number
- pmtrInfo = {
- 'pmtr7' : 'iparm',
- 'pmtr8' : 'low pass filter frequency',
- } # holds discription, preset for each pmtr in a dictionary
- default = {
- 'rhythmQ' : ((16, 1), (4, 2)) ,
- 'octQ' : ([7,8], 'randomChoice'),
- 'ampQ' : (60,70, 4, 'linearDown') ,
- 'panQ' : (.20, .60, .08, 'linearDown'),
- 'pmtr7' : (.1, .9, .1, 'linearUp'),
- 'pmtr8' : (800, 16000, 200, 'linearDown'),
- }
- author = '' # attribution
- orcCode = '''
- instr 10
- idur = p3
- iamp = ampdb(p4)
- ifrq = cpspch(p5)
- ipan = p6
- iparm = p7
- ilp_fq = p8
-
- k1 linseg 1, (.1*p3), .7, (.5*p3), .7, (.4*p3), 0
-
- ; kamp, kcps, icps, ifn, imeth iparm
- ; decay 0-1,
- a1 pluck iamp, ifrq, ifrq, 0, 3, iparm
- a2 pluck iamp, (ifrq * .51), ifrq*.51, 0, 3, iparm
- a4 pluck iamp, (ifrq * .24), ifrq*.24, 0, 3, iparm
-
- ;master mix
- a3 = ((a1 + a2 + a4) * k1)
- a6 tone a3, ilp_fq
- aMixSig = (a6 * 2)
- '''
- scoSample = '''
- ;ins start dur amp fq pan type low pass
- ;hats fq
- i14 0.000 0.100 95 8.02 .1 .6 16000
- ;tam tam
- i14 3.000 8.000 95 7.10 0 .2 1200
- '''
-
- #-----------------------------------------------------------------||||||||||||--
- class instr11(instrShell):
- inumber = 11
- name = 'noise'
- info = 'A noisy instrument.'
- pmtrFields = 6 # this is the base number
- pmtrInfo = {} # holds discription, preset for each pmtr in a dictionary
- default = {
- 'rhythmQ' : ((16, 1), (4, 1)) ,
- 'octQ' : ([7,8], 'randomChoice'),
- 'ampQ' : (60,70, 1, 'linearUp'),
- 'panQ' : (.20, .80, .08, 'linearUpDown'),
- }
- author = 'athenaCL native' # attribution
- orcCode = '''
- instr 11
- idur = p3
- iamp = ampdb(p4)
- iwhite = cpspch(p5)
- ipan = p6
- a1 rand iwhite
- k1 linen iamp, .5, idur, .2
- aMixSig = (k1 * a1)
- '''
- scoSample = '''
- '''
-
- #-----------------------------------------------------------------||||||||||||--
- class instr12(instrShell):
- inumber = 12
- name = 'noiseFiltered'
- info = 'A noisy instrument with with a filter.'
- pmtrFields = 8 # this is the base number
- pmtrInfo = {
- 'pmtr7' : 'filter center frequency',
- 'pmtr8' : 'filter bandwidth',
- } # holds discription, preset for each pmtr in a dictionary
- default = {
- 'rhythmQ' : ((16, 1), (16, 5)) ,
- 'octQ' : ([7,8], 'randomChoice'),
- 'ampQ' : (50,60, .5, 'linearDown') ,
- 'panQ' : (.20, .60, .08, 'linearDown'),
- 'pmtr7' : (400, 800, 20, 'linearUpDown'),
- 'pmtr8' : (1, 5, .2, 'linearUpDown'),
- }
- author = 'athenaCL native' # attribution
- orcCode = '''
- instr 12
- ;duration = p3
- iamp = ampdb(p4)
- ifreq = cpspch(p5)
- ipan = p6
- ;filter cf = p7
- ;filter bw = p8
-
- k1 linen 1, (p3*.9), p3, (p3*.1)
-
- ;create noise
- ; amp freq
- a1 randi p4, p5,
-
- ;create band pass filter
- ; signal, filter cf, filter bw
- a2 reson a1, p7, p8
-
- aMixSig = (k1 * a2)
- '''
- scoSample = '''
- ;ins strt dur amp fq pan fltr fltr
- ; 56 0-1 cf bw
- i56 00.0 2.0 .9 10000 .2 440 2
- '''
-
- #-----------------------------------------------------------------||||||||||||--
- class instr13(instrShell):
- inumber = 13
- name = 'rezzySynth'
- info = 'A highly resonated synth sound.'
- pmtrFields = 9 # this is the base number
- pmtrInfo = {
- 'pmtr7' : 'fq sweep (ms time or fq?)',
- 'pmtr8' : 'irez',
- 'pmtr9' : 'itabl1 (f-table to choose from)',
- } # holds discription, preset for each pmtr in a dictionary
- default = {
- 'rhythmQ' : ('binaryAccent', ((12,1,1),(3,1,1))) ,
- 'octQ' : ('basketGen', 'randomChoice', (5,6,7)),
- 'ampQ' : ('cyclicGen', 'linearDown', 60.00, 76.00, 2.00),
- 'panQ' : ('cyclicGen', 'linearDown', 0.20, 0.60, 0.08),
- 'pmtr7' : ('cyclicGen', 'linearUpDown', 20.00, 8000.00, 40.00),
- 'pmtr8' : ('cyclicGen', 'linearUpDown', 1.00, 20.00, 1.20),
- 'pmtr9' : ('cyclicGen', 'linearUpDown', 4, 5, 1),
- }
- author = '' # attribution
- orcCode = '''
- instr 13
- idur = p3
- iamp = ampdb(p4)
- ifqc = cpspch(p5)
- ipan = p6
-
- ; p7 = fq sweep
- irez = p8
- itabl1 = p9
-
- ; Amplitude envelope
- kaenv linseg 0, .01, 1, p3-.02, 1, .01, 0
-
- ; Frequency Sweep
- kfco linseg p7, .5*p3, .2*p7, .5*p3, .1*p7
-
- ; This relationship attempts to separate Freq from Res.
- ka1 = 100/irez/sqrt(kfco)-1
- ka2 = 1000/kfco
-
- ; Initialize Yn-1 & Yn-2 to zero
- aynm1 init 0
- aynm2 init 0
-
- ; Oscillator last number here is the table number
- axn oscil iamp, ifqc, itabl1
-
- ; Replace the differential eq. with a difference eq.
- ayn = ((ka1+2*ka2)*aynm1-ka2*aynm2+axn)/(1+ka1+ka2)
-
- atemp tone axn, kfco
- aclip1 = (ayn-atemp)/100000
- aclip tablei aclip1, 13, 1, .5
- aout = aclip*20000+atemp
-
- aynm2 = aynm1
- aynm1 = ayn
-
- aMixSig = (kaenv*aout)
- '''
- scoSample = '''
- ;ins start dur amp fq pan fq_sweep irex, itabl1
- '''
-
- #-----------------------------------------------------------------||||||||||||--
- class instr20(instrShell):
- inumber = 20
- name = 'fmBasic'
- info = 'A basic FM instrument.'
- pmtrFields = 8 # this is the base number
- pmtrInfo = {
- 'pmtr7' : 'fm factor',
- 'pmtr8' : 'modulation index',
- } # holds discription, preset for each pmtr in a dictionary
- default = {
- 'rhythmQ' : ('binaryAccent', ((7,1,1),(7,5,1))) ,
- 'octQ' : ('basketGen', 'randomChoice', (7,8)),
- 'ampQ' : ('cyclicGen', 'linearDown', 60.00, 76.00, 2.00) ,
- 'panQ' : ('cyclicGen', 'linearDown', 0.20, 0.60, 0.08),
- 'pmtr7' : ('cyclicGen', 'linearUpDown', 0.01, 8.00, 0.10),
- 'pmtr8' : ('cyclicGen', 'linearUpDown', 1.00, 6.00, 0.10),
- }
- author = '"basicfm.orc" from Csound Book examples' # attribution
- orcCode = '''
- instr 20
- ipan = p6
- iamp = ampdb(p4)
- i1 = 1/p3 ; ONE CYCLE PER DURATION OF NOTE
- i2 = cpspch(p5) ; CONVERTS PCHCLASS NOTATION TO Hz
-
- i3 = i2 * p7 ; i3 IS THE MODULATING FREQUENCY
- i4 = i3 * p8 ; i4 IS THE MAXIMUM FREQUENCY DEVIATION
-
- ampenv oscil iamp,i1,201 ; AMPLITUDE ENVELOPE FOR THE CARRIER
- ampdev oscil i4,i1,201 ; ENVELOPE APPLIED TO FREQUENCY DEVIATION
- amod oscili ampdev,i3,203 ; MODULATING OSCILLATOR
- asig oscili ampenv,i2+amod,203 ; CARRIER OSCILLATOR
-
- aMixSig = asig
-
- '''
- scoSample = '''
- ;p1 p2 p3 p4 p5 p6 p7 p8
- ;inst start dur amp PCH pan
- ; start dur amp carrierFQ fm_factor mod_index
- ;i1 1 5 70 7.06 .5 1 4
- ;i1 7 5 7.06 .5 1.414
- '''
-
- #-----------------------------------------------------------------||||||||||||--
- class instr21(instrShell):
- inumber = 21
- name = 'fmClarinet'
- info = 'A FM instrument tuned to sound clarinet-like.'
- pmtrFields = 7 # this is the base number
- pmtrInfo = {
- 'pmtr7' : 'imax value',
- } # holds discription, preset for each pmtr in a dictionary
- default = {
- 'rhythmQ' : ('binaryAccent', ((7,3,1),(7,5,1)) ),
- 'octQ' : ('basketGen', 'randomChoice', (6,7)),
- 'ampQ' : ('cyclicGen', 'linearDown', 60.00, 70.00, 1.00) ,
- 'panQ' : ('cyclicGen', 'linearDown', 0.20, 0.60, 0.08),
- 'pmtr7' : ('cyclicGen', 'linearUpDown', 1.50, 6.00, 0.20),
- }
- author = '''
- FMclarinet.orc from amsterdam catalog
- ACCCI: 20_10_4.ORC
- synthesis: FM(20),
- FM with dynamic spectral evolution (10)
- clarinet settings(3)
- source: Chowning (1973)
- coded: jpg 8/92
- ''' # attribution
- orcCode = '''
- instr 21
- idur = p3
- iamp = ampdb(p4)
- ifenv = 211 ; clarinet settings:
- ifdyn = 212 ; amp and index envelope see flow chart
- ifq1 = cpspch(p5)*3 ; N1:N2 is 3:2, imax=5
- if1 = 210 ; duration ca. .5 sec
- ifq2 = cpspch(p5)*2
- if2 = 210
- imax = p7
- imin = 2
- ipan = p6
-
- aenv oscili iamp, 1/idur, ifenv ; envelope
-
- adyn oscili ifq2*(imax-imin), 1/idur, ifdyn ; index
- adyn = (ifq2*imin)+adyn ; add minimum value
- amod oscili adyn, ifq2, if2 ; modulator
-
- a1 oscili aenv, ifq1+amod, if1 ; carrier
-
- aMixSig = a1
-
- '''
- scoSample = '''
- ;p1 p2 p3 p4 p5 p6 p7
- ;inst start dur amp PCH pan
- ; idur iamp pch imax
- i1 0 .5 75 8.00 4 ; scale by clarinet
- i1 + . . 8.02 .
- i1 . . . 8.04 .
- '''
-
- #-----------------------------------------------------------------||||||||||||--
- class instr22(instrShell):
- inumber = 22
- name = 'fmWoodDrum'
- info = 'A FM instrument tuned to sound wood-drum-like.'
- pmtrFields = 6 # this is the base number
- pmtrInfo = {} # holds discription, preset for each pmtr in a dictionary
- default = {
- 'rhythmQ' : ('loop', ((8,3,1),(8,3,1),(8,3,1),(8,1,0),(4,1,1),(4,1,1),(8,1,1),(8,1,0))) ,
- 'octQ' : ('basketGen', 'randomChoice', (2,2)),
- 'ampQ' : ('cyclicGen', 'linearDown', 80.00, 81.00, 1.00) ,
- 'panQ' : ('cyclicGen', 'linearDown', 0.20, 0.60, 0.08),
- }
- author = '''
- FMwoodDrum.orc from amsterdam catalog
- ACCCI: 20_10_2.ORC
- synthesis: FM(20),
- FM with dynamic spectral evolution (10)
- wood-drum settings(2)
- source: Chowning(1973)
- coded: jpg 8/92
- ''' # attribution
- orcCode = '''
- instr 22
- idur = p3
- iamp = ampdb(p4)
- ifenv = 251 ; wood drum settings:
- ifdyn = 231 ; amp and index envelopes see flow chart
- ifq1 = cpspch(p5)*16 ; N1:N2 is 80:55 = 16:11, imax=25
- if1 = 210 ; duration = .2 sec
- ifq2 = cpspch(p5)*11
- if2 = 210 ; same gen used by clar
- imax = 25
- ipan = p6
-
- aenv oscili iamp, 1/idur, ifenv ; envelope
- adyn oscili ifq2*imax, 1/idur, ifdyn ; dynamic
- amod oscili adyn, ifq2, if2 ; modulator
- a1 oscili aenv, ifq1+amod, if1 ; carrier
-
- aMixSig = a1
- '''
- scoSample = '''
- ;p1 p2 p3 p4 p5 p6 p7
- ;inst start dur amp PCH pan
- ; idur iamp pch
- ;i1 0 .2 76 3.00 .5 ; scale in wood drum...
- ;i1 + . . 3.02 .
- '''
-
- #-----------------------------------------------------------------||||||||||||--
- class instr30(instrShell):
- inumber = 30
- name = 'samplerUni'
- info = 'A simple sampler that plays any number of single audio files. Audio files are given with a complete file path.'
- pmtrFields = 12 # this is the base number
- pmtrInfo = {
- 'pmtr7' : 'skip time',
- 'pmtr8' : 'atack',
- 'pmtr9' : 'release',
- 'pmtr10' : 'reverb time',
- 'pmtr11' : 'reverb gain',
- 'pmtr12' : 'file path chooser',
- } # holds discription, preset for each pmtr in a dictionary
- default = {
- 'rhythmQ' : ('binaryAccent', ((9,6,1),(9,2,1)) ),
- 'octQ' : ('basketGen', 'randomChoice', (7,8)),
- 'ampQ' : ('cyclicGen', 'linearDown', 2.00, 9.00, 0.25) ,
- 'panQ' : ('cyclicGen', 'linearDown', 0.30, 0.70, 0.08),
- 'pmtr7' : ('constant', 0),
- 'pmtr8' : ('cyclicGen', 'linearUp', .03, .10, .01),
- 'pmtr9' : ('constant', 0.1),
- 'pmtr10' : ('cyclicGen', 'linearUp', .5, 2.1, .2),
- 'pmtr11' : ('cyclicGen', 'linearUp', .00, .50, .05),
- 'pmtr12' : ('sampleSelect', ('drum01.aif', 'latch01.aif')),
- }
- author = 'athenaCL native' # attribution
- orcCode = '''
- instr 30
- idur = p3
- iamp = ampdb(p4)
- ifreq = cpspch(p5)
-
- ipitch = .5
- ipan = p6
- iskiptime = p7
- iattack = p8
- irelease = p9
- irvbtime = p10
- irvbgain = p11
- ;use full pathnames for samples
- iSamplePath = p12 ; selects which sample
-
- kamp linen iamp, iattack, idur, irelease
- asig soundin iSamplePath, iskiptime
-
- ;this doesnt work yet
- ;asig diskin iSamplePath, ipitch, iskiptime, 0
-
- arampsig = kamp * asig
- aeffect reverb asig, irvbtime
- arvbreturn = aeffect * irvbgain
-
- aMixSig = arampsig + arvbreturn
- '''
- scoSample = '''
- ; ins strt dur amp(db) p5(pch) p6(pan) skip atk rel rvbt rvbgain samplePath
- i8 0 1 20 8.0 .0 0 .03 .1 1.5 .2 "/athenaCL/ATHssdir/drum01.aif"
- i8 2 1 20 8.0 .3 0 .8 .1 1.3 .5 "/athenaCL/ATHssdir/drum01.aif"
- i8 3.5 2.25 20 8.0 .5 0 .5 .1 2.1 .2 "/athenaCL/ATHssdir/latch01.aif"
- '''
-
- #-----------------------------------------------------------------||||||||||||--
- class instr40(instrShell):
- inumber = 40
- name = 'pvocUni'
- info = 'A simple pvoc instrument.'
- pmtrFields = 7
- pmtrInfo = {
- 'pmtr7' : 'pvc analysis file to use',
- } # holds discription, preset for each pmtr in a dictionary
- default = {
- 'rhythmQ' : ('loop', ((5, 6, 1), (5, 2, 0), (5, 11, 1), (5, 3, 1))),
- 'octQ' : ('basketGen', 'randomChoice', [7,8]),
- 'ampQ' : ('cyclicGen', 'linearDown', 2.00, 9.00, 0.25),
- 'panQ' : ('cyclicGen', 'linearDown', 0.30, 0.70, 0.08),
- 'pmtr7' : ('analysisSelect', ('drum01.pvc',)),
- }
- author = 'athenaCL native' # attribution
- orcCode = '''
- instr 40
- idur = p3
- iamp = ampdb(p4)
- ifreq = cpspch(p5)
- ipan = p6
-
- iAnalysisPath = p7 ;use full pathnames for analysis files
-
- kEnvelope linseg 0, .05, 1, (p3-.10), 1, .05, 0 ;quick envelope
-
- kTimePosition line 0, p3, p3 ;error if this is too large
- kFqMod line 1, p3, 1
-
- asig pvoc kTimePosition, kFqMod, iAnalysisPath
-
- aMixSig = kEnvelope * asig
- '''
- scoSample = '''
- '''
-
-
-
-
-
-
-